-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
allow titles to be string in various places #7262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- layout titles and subtitles - cartesian axis titles - gl3d axis titles - polar axis titles - ternary axis titles - pie and funnelarea titles - colorbar titles - legend titles - shape titles - carpet titles - indicator titles
test/jasmine/tests/titles_test.js
Outdated
|
||
afterEach(destroyGraphDiv); | ||
|
||
it('still supports title-as-string', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove still
test/jasmine/tests/titles_test.js
Outdated
.then(done, done.fail); | ||
}); | ||
|
||
it('can be updated using deprecated title-as-string', function(done) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove deprecated
@archmoj Should these tests be added in this branch? They are the only ones in my old branch which are not added here. #7230 (comment) |
@archmoj I think I found a bug -- title text is showing up in the subtitle as well. Codepen: https://codepen.io/emilykl-code/pen/jOgvzGd |
@@ -1335,7 +1339,11 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) { | |||
coerce('title.y'); | |||
coerce('title.yanchor'); | |||
|
|||
coerce('title.subtitle.text', layoutOut._dfltTitle.subtitle); | |||
var subtitleIn = layoutIn.title; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@archmoj This must be the source of the bug -- should be layoutIn.title.subtitle
Closing in respect to @alexcjohnson's comment on slack: |
Supersedes #7230 to simplify support and avoid adding this option via a deprecated attribute!
@plotly/plotly_js
Allow titles to be string, this includes: